from django.db import models

from cinema_ticketing_system_web import settings


class Movie_info(models.Model):
    id  = models.IntegerField(primary_key=True)
    name = models.CharField(max_length=100)
    show_time = models.DateTimeField()
    mainact = models.CharField(max_length=500)
    introduce = models.CharField(max_length=5000)
    movie_info = models.CharField(max_length=200)
    type = models.CharField(max_length=45)
    score = models.FloatField(default=0)  #评分
    main_img = models.TextField() #电影封面地址
    mediadir = models.TextField() #多媒体文件目录

class Movie_comment(models.Model):
    id = models.AutoField(primary_key=True)
    author = models.CharField(max_length=50)
    content = models.CharField(max_length=600)   #内容最大长度
    likecount = models.IntegerField()
    belong = models.IntegerField()         #评论所属影片或者评论的id

class Movie_news(models.Model):
    id = models.AutoField(primary_key=True)
    introduce = models.CharField(max_length=600)  #咨询简介
    linkaddr = models.CharField(max_length=100)   #咨询链接地址
    belong = models.IntegerField()  #咨询所属电影id


